#include"Task_queue.hh"
#include"consumer.hh"
#include"producer.hh"
#include<iostream>
#include<thread>

using std::thread;

int main(void)
{
    //新建对象
    Producer pro;
    Consumer con;
    Taskqueue task(10);
    thread thp(&Producer::push,&pro,std::ref(task));
    thread thc(&Consumer::get_asset,&con,std::ref(task));

    //等待
    thp.join();
    thc.join();
    std::cout<<"done <<endl"<<std::endl;
    return 0;
};
